<?xml version="1.0" encoding="utf-8"?>
<taskrunner name="update.files" version="1.0" date="2008-10-30" maxthreads="1">

	<!--  -->

	<includes>
		<file name="vida.install.settings.xml" />
	</includes>

  
	

	<tasks>
		<task name="copy.files" typename="@DirectoryCopy">
      <description>
        Copies database scripts from source to target.
      </description>
			<parameters>
				<parameter name="src" value="${install.src.db.update.dir}"/>
				<parameter name="dst" value="${target.db.update.dir}"/>
			</parameters>
		</task>

    <task name="remove.readonly.attribute" typename="@CommandLine">

      <description>
        removes the attribute read-only on all files in ${target.db.update.dir}
      </description>
      <dependencies list="copy.files"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.db.update.dir}"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>


    <foreach enum="postinstall.files">
      <task name="update.release.tag" allowMultipleInstances="true" typename="@ReplaceInFile">
        <dependencies list="remove.readonly.attribute"/>
        <parameters>
          <parameter name="filename" value="${target.db.update.dir}\$[postinstall.files:key]"/>
          <parameter name="original" value="VIDA_REPLACE_RELEASE"/>
          <parameter name="replacement" value="${release}"/>
        </parameters>
      </task>

      <task name="update.language.tag" allowMultipleInstances="true" typename="@ReplaceInFile">
        <dependencies list="update.release.tag"/>
        <parameters>
          <parameter name="filename" value="${target.db.update.dir}\$[postinstall.files:key]"/>
          <parameter name="original" value="VIDA_REPLACE_LANGUAGE"/>
          <parameter name="replacement" value="%{VIDA_LANGUAGE}"/>
        </parameters>
      </task>  
    </foreach>
		

		
	</tasks>
</taskrunner>
